package huixue.cn.com.rxapp.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.support.annotation.Nullable;

import huixue.cn.com.library.util.LogUtils;
import huixue.cn.com.rxapp.CalculateInterface;

/**
 * Created by Administrator on 2018/8/14.
 */

public class CalculateService extends Service {

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return mBinder;
    }

    private CalculateInterface.Stub mBinder = new CalculateInterface.Stub() {
        @Override
        public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException {

        }

        @Override
        public int add(int a, int b) throws RemoteException {
            LogUtils.e("wjh","收到了远程的请求");
            return a+b;
        }
    };
}
